package com.cmcc.groupcontacts.firewall.dao.model;

import android.content.ContentValues;

/**
 * 信息拦截记录数据模型
 * 
 * @author 
 * 
 */
public class SmsListVO extends CallInfoVO {
	private static final long serialVersionUID = -9184203758353283381L;

	private Integer id;
	private int type;
	private int protocal;
	private String subject;
	private String body;
	private boolean isRead;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getProtocal() {
		return protocal;
	}

	public void setProtocal(int protocal) {
		this.protocal = protocal;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public boolean isRead() {
		return isRead;
	}

	public void setRead(boolean isRead) {
		this.isRead = isRead;
	}

	public static class MetaData {
		public static final String ID = "id";
		public static final String NUMBER = CallInfoVO.MetaData.NUMBER;
		public static final String NAME = CallInfoVO.MetaData.NAME;
		public static final String DATE = CallInfoVO.MetaData.DATE;
		public static final String TYPE = "type";
		public static final String PROTOCAL = "protocal";
		public static final String SUBJECT = "subject";
		public static final String BODY = "body";
		public static final String IS_READ = "is_read";
		public static final String[] ALL_COLS = { ID, NUMBER, NAME, DATE, TYPE, PROTOCAL, SUBJECT, BODY, IS_READ };
		public static String CREATE_DDL = "CREATE TABLE sms_list (id INTEGER PRIMARY KEY,number TEXT,name TEXT,date INTEGER,type INTEGER,protocal INTEGER,subject TEXT,body TEXT,is_read INTEGER);";
	}

	@Override
	public ContentValues parse2ContentValues() {
		super.parse2ContentValues();

		putValue(MetaData.ID, id);
		putValue(MetaData.TYPE, type);
		putValue(MetaData.PROTOCAL, protocal);
		putValue(MetaData.SUBJECT, subject);
		putValue(MetaData.BODY, body);
		putValue(MetaData.IS_READ, isRead);
		return contentValues;
	}
}
